how to solve capacitor circuits